package com.quantdo.qtm.mysql.service.monitor.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.quantdo.qtm.mysql.pojo.model.MysqlStatusCurrDo;
import com.quantdo.qtm.mysql.pojo.model.MysqlStatusPointDo;
import com.quantdo.qtm.mysql.service.monitor.SingleUpdateOpareService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.DeleteQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.InnodbBufferPoolService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.InsertQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.MyisamBufferPollService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.QpsMonitorService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.ReceivedFluxService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.SelectQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.SentFluxService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.SlowQueriesService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.ThreadConnedQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.ThreadConningQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.TpsMonitorService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.UpdateQtyService;
import com.quantdo.qtm.mysql.service.monitor.impl.rule.WriteQtyService;

@Service
public class MysqlSingleUpdateOpareServiceImp{
    @Autowired
    private QpsMonitorService qpsMonitorService;
    @Autowired
    private TpsMonitorService tpsMonitorService;
    @Autowired
    private SelectQtyService selectQtyService;
    @Autowired
    private InsertQtyService insertQtyService;
    @Autowired
    private UpdateQtyService updateQtyService;
    @Autowired
    private DeleteQtyService deleteQtyService;
    @Autowired
    private WriteQtyService writeQtyService;
    @Autowired
    private ThreadConnedQtyService threadConnedQtyService;
    @Autowired
    private ThreadConningQtyService threadConningQtyService;
    @Autowired
    private SlowQueriesService slowQueriesService;
    @Autowired
    private SentFluxService sentFluxService;
    @Autowired
    private ReceivedFluxService receivedFluxService;
    @Autowired
    private InnodbBufferPoolService innodbBufferPoolService;
    @Autowired
    private MyisamBufferPollService myisamBufferPollService;
    
    
    
    public void updateOpare(MysqlStatusCurrDo statusCurrNewDo, MysqlStatusCurrDo statusCurrOldDo, MysqlStatusPointDo pointDo) {
        updateOpare(qpsMonitorService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(tpsMonitorService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(selectQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(insertQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(updateQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(deleteQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(writeQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(threadConnedQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(threadConningQtyService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(slowQueriesService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(sentFluxService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(receivedFluxService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(innodbBufferPoolService, statusCurrNewDo, statusCurrOldDo, pointDo);
        updateOpare(myisamBufferPollService, statusCurrNewDo, statusCurrOldDo, pointDo);
    }
    
    public void updateOpare(SingleUpdateOpareService service, MysqlStatusCurrDo statusCurrNewDo, MysqlStatusCurrDo statusCurrOldDo, MysqlStatusPointDo pointDo) {
        service.updateOpare(statusCurrNewDo,statusCurrOldDo,pointDo);
    }
    
}
